-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cpu/native: use async read for stdio_read() #19002
Open
benpicco
wants to merge
10
commits into
RIOT-OS:master
Choose a base branch
from
benpicco:cpu/native-read_preempt
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+80
−33
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Murdock results❌ FAILED 41ce809 sys/net/telnet: align API with stdio API Build failures (10)
Test failures (21)
Artifacts |
04cbcef
to
9046e8a
Compare
@leandrolanzieri do you have an idea how to solve the Kconfig issue? |
9046e8a
to
bfdf538
Compare
bfdf538
to
42e8122
Compare
gschorcht
reviewed
Dec 20, 2022
gschorcht
reviewed
Dec 20, 2022
gschorcht
approved these changes
Dec 20, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good and works as expected.
Please squash. |
ebac29d
to
ad755ef
Compare
CI will still fail as some tests that use |
fac3e92
to
19166ac
Compare
39dfc42
to
b6db3f0
Compare
The real_read() function will block the thread but won't preempt it. That means all other thereads on the same (or higher) priority level are blocked as RIOT still consideres the thread that called stdio_read() as running. Use async_read/isrpipe to properly block the thread when reading from stdin.
It's no longer working on native, but native behaves more like a real board now.
b6db3f0
to
17f8f9c
Compare
17f8f9c
to
c65dd56
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area: build system
Area: Build system
Area: cpu
Area: CPU/MCU ports
Area: examples
Area: Example Applications
Area: network
Area: Networking
Area: pkg
Area: External package ports
Area: sys
Area: System
Area: tests
Area: tests and testing framework
CI: no fast fail
don't abort PR build after first error
CI: ready for build
If set, CI server will compile all applications for all available boards for the labeled PR
Platform: native
Platform: This PR/issue effects the native platform
Type: bug
The issue reports a bug / The PR fixes a bug (including spelling errors)
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Contribution description
The real_read() function will block the thread but won't preempt it.
That means all other threads on the same (or higher) priority level are blocked as RIOT still considers the thread that called
stdio_read()
as running.Use async_read/isrpipe to properly block the thread when reading from stdin.
Testing procedure
Run a 2nd thread with the same priority as the main thread:
On
master
the periodic"Hello shell"
message is never printed.Issues/PRs references
fixes #16834